#include "star.h"

Star::Star(Game *g) : Actor(g){
    reinit();
}

void Star::reinit(){
    x=rand()%SCREEN_W;
    y=0;
    vy=1+rand()%4;
}

void Star::move(){
    y+=vy;
    if (y>SCREEN_H){
        reinit();
    }
}

void Star::hit(Actor *a, int damage)
{
    game->actor_manager->del(this);
}
